import Taro, {Component, Config, login} from '@tarojs/taro'
import {ComponentClass} from 'react'
import { View, Text } from '@tarojs/components'

type PageOwnProps = {}
type PageState = {
  pagename: string
}
interface Login {
  state: PageState
}
class Login extends Component {
  constructor() {
    super();
    this.state = {
      pagename: '登录'
    }
  }
  config: Config = {
    navigationBarBackgroundColor: '#282e3e',
    navigationBarTextStyle: 'white',
    navigationBarTitleText: '登录'
  }

  render () {
    return (
      <View>
        <Text>
          这是{this.state.pagename}页面
        </Text>
      </View>
    )
  }
}

export default Login as ComponentClass<PageOwnProps,PageState>